The ‘walking’ piece with while is a subordinate clause modifying the entire sentence and the one without while is a participle phrase modifying we. By chance, in their present form and with the present content there is no real difference in meaning, and you may write either.
Under other circumstances, however, there may be a substantial difference.
For instance, if you rearrange these sentences and put the subordinate clause second, they have different meanings:
(a) We saw lovely flowers while walking through the park.
(b) ∗ We saw lovely flowers walking through the park.
Here (a) has the same meaning as your original example, but the participle phrase in (b) now modifies the closest nominal, flowers, and implies that the flowers were walking! That of course is absurd, and the meaning you intended would be obvious; but that would not be the case here:
(c) We saw a sinister man while running through the park.
(d) We saw a sinister man running through the park.
In (c), we were running, but in (d) it was the sinister man who was running.
The lexical aspect of the verb in the when clause plays a role, too. If while bears the sense during rather than although, a clause like while VERBing [complements] is parsed as a reduced form of a clause with a progressive construction, while X is/was VERBing [complements].
A stative verb like know cannot support a clause headed by while in this sense, because stative verbs cannot support the progressive construction:
(e) Knowing French, John could easily read the passage from Voltaire.
(f) ∗ While knowing French, John could easily read the passage from Voltaire.
In (f) a temporal sense of the while clause would imply while he was knowing French, which is impermissible. Consequently, the clause will be understood as although he knew French—which is absurd.
In other cases a different sequence and relationship of events is implied with and without while. A while clause is inherently durative and imperfective, so its action is understood to overlap the action of the main clause, regardless of the sequence of the clauses:
(g) While opening the gate Racozky texted the code phrase to his waiting minions.
(h) Racozky texted the code phrase to his waiting minions while opening the gate.
(i) Opening the gate, Racozky texted the code phrase to his waiting minions.
(j) Racozky texted the code phrase to his waiting minions, opening the gate.
(g) and (h) have the same meaning: Racozky texted during the timespan he spent opening the gate. But in (i) we understand that Racozky texted after he opened the gate—perhaps notifying his minions that the gate was now open; and in (j) we understand that Racozky texted first, and that somehow caused the gate to be opened.