You can't directly type a cheat to set a specific need bar (e.g., "Hunger 100"). However, testingcheatsenabled true unlocks powerful drag-and-drop manipulation.
modifySim [FirstName] [LastName] [Stat] [Value] — Does not work on core Needs (Hunger, Energy, Bladder, etc.) in standard TS3. It modifies hidden stats (CelebrityLevel, HiddenSkill, etc.). Do not rely on this for needs.