giacomoporetti:
I need to connect the LED to the D4 pin (right?)
No, you could connect an LED to any of the digital pins. The WeMos D1 Mini has the little built in blue LED connected to D4 so if you don't want to connect an external LED you could use that one.
giacomoporetti:
where should I connect the sensor?
Which sensor are you using?
giacomoporetti:
How do I decide it?
Some pins do have special properties so the device you are attaching to the pin can determine which pin it must be connected to but in general you could use any of the pins that start with D as a digital input or output.
That depends entirely on how they're wired. Most LEDs are hooked up to be active HIGH, but active LOW is also an option and nothing prevents one of each from being on the same pin.
giacomoporetti:
some of them have 10k,scl,sda exc... is this important or only IO is important in my situation?
Sometimes schematics and diagrams will be labelled with the function of a pin instead of its Arduino label. I would heavily encourage you to do the same as well. For example, instead of saying LED1, LED2, LED3, Button1, and Button2, label them something like Error, Activity, PowerOn, Start/Pause, and Menu, or whatever intention that you are using the pin for.
Obviously you will still need to know what pins they are going to, but having the additional function label makes it easy for humans to interpret what's going on, especially if you use the customary names for standard funcitons. A pair of wires called SCL and SDA makes it dead obvious that there's an I2C bus on the board, for example.