Why do VTOL aircraft (F-35 or Harrier) have only one engine?
VTOL aircraft can have more than one engine. It is just that the design process of the Harrier and F-35 led to a situation where only one engine was required.

The main challenge in any VTOL aircraft is to have the engine produce thrust in two different phases of flight: during cruise and during takeoff/landing. This basically requires the powerplant on the aircraft to have two different characteristics at those two phases, because


The direction of the thrust vector is different in TO/Landing and cruise
Amount of thrust required is different; for vertical TO, the thrust should be more than the weight while in cruise, the required thrust is (comparatively) pretty low.


A number of approaches have been tried to solve this problem: 


Takeoff the aircraft vertically (aka the tail sitter), like Ryan X-13 Vertijet, and then transition to horizontal flight. However, one major problem is the pilot has severe disorientation problems during transition
Put extra fans, like the Ryan XV-5 Vertifan. The problem was the large (wing) area taken up by the fan and weight penalties. Ironically, a similar concept has been used in F-35
Put extra engines specifically for vertical lift (aka the 'Rolls Royce Concept'), used in Dassault Mirage Balzac. Though this offered (theoretically) better safety, the weight penalty was too much.
Optimise the main engine for cruise and deflect the thrust for takeoff and augment with (small) lift engines (aka the tiltjet concept), like the German EWR VJ 101. This reduced the weight penalty and complexity, but reduced safety in the event of an engine failure.


In order to avoid the weight penalty, the best approach is to have no extra engines at all, with the thrust deflected down at take off and landing. This was called 'vectored thrust' (a term attributed to Theodore Von Karman). This concept was tested in the Bell X-14, which had fixed eingines and thrust vectoring vanes that deflected the exhaust to achieve vertical lift.



Source: history.nasa.gov

In case of the Harrier, the engine, the Bristol Siddeley Pegasus was first developed (as BE.53) and the Hawker aircraft decided to develop an aircraft around it. 

During the design proces, the aircraft was redesigned around the Hawker modified BE 53 which the rear jet was split into two, like the Hawker Sea Hawk, which had a similar arrangement. This lead to the 'four poster' thrust vectoring system in the  Harrier.



Source: www.aerospaceweb.org

This is the reason, the Harrier had a single engine.

The case of F-35 is different. The F-35 was designed to replace aircraft operated by a number of US services, and as such had conflicting design requirements. At one end, the USAF wanted a conventional fighter while the USMC wanted a VTOL aircraft. The USN requirements were somewhere in the middle.

Lockheed designers decided that the best way to meet these requirements is to have a separate fan for lifting the aircraft in VTOL, which can simply be eliminated in the USAF and USN variants. This led to the lift fan arrangement (eerily similar to the Vertifan arrangement).



"F-35B Joint Strike Fighter (thrust vectoring nozzle and lift fan)" by Tosaka - Own work. Licensed under CC BY 3.0 via Commons.

So, in case of F-35 the use of a single engine was the best way to meet the requirements. The engine used, the Pratt &amp; Whitney F135 is the most powerful fighter jet engine in service, which helps in making F-35 the first supersonic VTOL aircraft.