First, decide what attractions you want to see. Buckingham Palace, the Tower of London, and Westminster Abbey are all popular tourist destinations. But there are also many other interesting places to visit.
With 2-3 days in London, you will be able to see several London sights and do a few activities. If this is possibly your only trip to London, you might want to plan for 5-7 days in order to check as many things off your London bucket list as possible.