Electronic structure and properties of light atoms intercalated in graphite