C scrabble counter with piping input
General Observations
This code should work just fine, but performance can be enhanced.
Initialize Arrays to Zero at Compile Time
Currently there is a performance hit in the code when initializing the array t to zero. The function memset() is a runtime function, by initializing the array t to zero there is no run time cost:
    char t[32767] = {0};

The previous line of code initializes the entire array to zero (equivalent to the call to memset()) and should not affect run time.
Use Table Lookup Over Long Switch Statements
The Scrabble word scoring question linked to in this question uses a table look up instead of a long switch statement. Table lookup is better for 2 reasons, the first is that it will only be one line of code rather than at least 26 lines of code, the second reason is that table lookup should be much faster than the logic that implements the switch/case statement.
Magic Numbers
The code includes unistd.h for the definition of the symbolic constant STDIN_FILENO but the numeric constant 32767 is used multiple times rather than defining a symbolic constant for it. It would be better to define a symbolic constant for 32767 using either a const declaration or a #define preproccessor statement.
    const size_t INPUT_BUFFER_SIZE = 32767;

or
#define INPUT_BUFFER_SIZE 32767

This makes the code more readable and much easier to maintain, since an edit to change the value would only need to be performed on one line rather than having to search through the code to replace every instance of the numeric constant.
    char t[INPUT_BUFFER_SIZE];
    unsigned int val = 0;
    if (argc == 2)
    {
        memset(t, '\0', sizeof(t));
        strcpy(t, argv[1]);
    }
    else
    {
        read(STDIN_FILENO, t, INPUT_BUFFER_SIZE);
    }

Portability
The include file unistd.h does not port to Windows or some other non POSIX systems, which means this code won't even compile on some systems. While it is less readable, using zero is more portable, or have an ifdef in the code to define STDIN_FILENO on all systems.
#ifndef STDIN_FILENO
#define STDIN_FILENO 0
#endif

The Code Doesn't Allow for Switches on the Commandline
The code makes an assumption that there is no commandline switch that precedes the input to be processed if argc is greater than 1. This could result in bugs in the future. It might be best to have some kind of check for switches in the command line processing.
Complexity
If the code continues to use the switch/case statement then it would be better to move that statement into it's own function that returns an integer value.