Historically, variables were declared up front in many languages because you had to instruct the compiler up front to associate registers and/or allocate space for them on the stack. In .NET, this is actually still required in the IL code, as it makes the compiler's job easier.
Thankfully C# is much higher level than IL, so we don't have to worry about those details. Freed from that constraint, there is a lot of conceptual value in limiting the scope of variables, as it means there is less code you have to look at to understand what happens to that variable. A variable declared at the top of a method can potentially be used anywhere in that method. A variable declared inside an inner 'if' is only used within that scope and you can ignore it once outside that scope; also, variables declared later in the method can only be used after their declaration. It's insulation/encapsulation in miniature, further reducing the number of things the developer has to think about at once to understand what a given piece of code is doing.