Both are budget-friendly cards from a similar era, so the gap between them isn't huge. That said, many gamers lean toward Nvidia for its driver support and overall reliability, so the GeForce GT 540 gets the nod here.
Ultimately, either card will handle older and less demanding titles well, but for the best experience it's worth checking benchmarks for the specific games you plan to play.