Socket chat room made with Tkinter Python
This is a nice snippet which makes it useful for teaching! Here are some points:

Make imports explicit

Though import socket, threading is valid in Python, importing in two lines improves readability

import socket
import threading


Two lines after imports

Add two lines after imports. From this:

import socket
import threading
host = socket.gethostname()
...


to this:

import socket
import threading


host = socket.gethostname()
...


Constants in caps

port = 4000 should be PORT = 4000

Use string formatting

From this:

"%s has left the chat." % data


to this:

"{} has left the chat.".format(data)


In case of curly braces, you escape using {{}} as in the following case:

'Welcome {}! If you ever want to quit, type {{quit}} to exit.'.format(data)


Broadcast before handle_client

Since in handle_client you use broadcast, define it first

def broadcast(msg, prefix=""):
    ...

def handle_client(conn):
    ...


Add a message function

enclose:

bytes(msg, "utf8")


in a function called message:

def message(text):
    return bytes(text, "utf8")


then it becomes neater to use:

broadcast(message('hi'))


More explicit messages:


1) Server message


When first connecting, the server console states for me:

jPC
Server is ready...


And then when running clients, you get asked:

Enter server name:


I had to deduce that jPC is my server name. Modifying to the following might be more explicit:

Server name: jPC
Server is ready...



2) Enter username


Enter username in the textbox might be a better message. Coupled with the fact that you did not use a placeholder for the entry, users are confused.


3) Quiting without username


If someone quits without setting a username the server says:

{quit} has left the chat.


Adding a default id for clients might be better

{
    '&lt;id2&gt;': {
                'username': None,
                'connection_ip': '192.168.56.1:50325'
    },
    '&lt;id2&gt;': ...
}


you can use the uuid module for id or use the ip itself as id

Add placeholder effect

Add a placeholder effect by adding the line:

entry_field.bind("&lt;FocusIn&gt;", lambda args: entry_field.delete('0', 'end'))


Setting the font color to gray completes the effect.

Miscellaneous


Use snake case for variables. serverRunning becomes server_running
Use a geometry manager like grid for better display