In some cases, your computer may keep waking up after you've put Windows to sleep mode. Aside from someone moving the mouse, hitting a keyboard key, or plugging in some kinds of peripheral, a common cause that keeps waking up your PC is a network card or network adapter. Some programs designed to check for updated information online trigger network card activity. I'll show you how to prevent this device from waking up Windows 7 / 8, or Windows 10.
In Windows 7 and Windows 10, open the start menu and type "device". Then, select "Device Manager" under Control Panel. You'll get a "You are logged on as a standard user" message: since changing hardware configuration requires elevated privileges, you'll need to type the administrator's password before changing anything. If you don't get that message, you're probably running as an administrator: you should change your account type to a "standard user".
In Windows 8 / 8.1, type "device" on the start screen instead. Once in the device manager, double-click on Network adapters to expand, and right-click on your network card. Its name will of course depend on your hardware, but you can eliminate anything that says Bluetooth, for example. Choose Properties.
When the device's Properties dialog opens, click on the Change button: the shield icon indicates that this is a protected feature (thus the need to enter the administrator's password). When the next dialog opens, select the Power Management tab on the right. Uncheck the "Allow this device to wake the computer" checkbox, and click OK to apply. Restart your PC when you can.
From now on, your computer should no longer wake up by itself - assuming that the network card was the reason. The steps are the same if you suspect another device or peripheral from waking up your PC: if the problem isn't fixed, try doing the same thing for the piece of hardware you suspect is guilty!