Given the two options, you will usually want option B, as it uses fewer queries and may return fewer rows if Condition1 and Condition2 both apply to a single record; you have a much lower limit for queries than you do other limits, except for DML statements.
However, sometimes you'll be forced to use option A, such as the query becoming so complex that the system either raises an error (perhaps a selectivity error on a large object), or because you end up using far more CPU time with multiple if statements. The best option will usually be dictated by a balance between being able to read the code and minimizing governor limit usage.
As an aside, if you're going to use option A, try to descope the query results as soon as possible:
{
Foo__c[] records = [SELECT ... FROM Foo__c WHERE Condition1];
for(Foo__c record: records) {
// Do Something
}
}
{
Foo__c[] records = [SELECT ... FROM Foo__c WHERE Condition2];
for(Foo__c record: records) {
// Do Something Else
}
}
Even better, use inline queries directly in the loop statement, as this reduces heap usage on large queries. Using option B, you can gain quite a bit of performance by inlining the query:
for(Foo__c record:[SELECT ... FROM Foo__c WHERE Condition1 OR Condition2]) {
if(record == Condition1) {
// Do Something
}
if(record == Condition2) {
// Do Something Else
}
}
This has the distinct advantage of using less heap space, as the query will be internally chunked using query/queryMore. This will make a significant difference as the number of records returned by the query increases, especially as compared to option A if many of those records meet both Condition1 and Condition2.
For example, if the net number of rows is 25,000, both option A and B, as described, will need to store 25,000 records in memory. Using an inline query reduces the heap usage to just 200 records at a time.